package com.bookmanager.www.common.config;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: 风离
 * @Date: 2021/09/19/9:55
 * @Description: 关闭Shiro自带Session
 */
public class JwtDeafultSubjectFactory extends DefaultWebSubjectFactory {
    @Override
    public Subject createSubject(SubjectContext context) {
        // 不创建 session
        context.setSessionCreationEnabled(false);
        return super.createSubject(context);
    }
}
